import request from '@/utils/request'


export function getList(page, data) {
  return request({
    url: `/?m=role&a=list&page=${page}`,
    method: 'POST',
    data
  })
}


export function setStatus(data) {
  return request({
    url: `/?m=role&a=status`,
    method: 'POST',
    data,
  })
}

export function getMenu(id) {
  return request({
    url: `/?m=role&a=menu`,
    method: 'POST',
    data: {id: id},
  })
}

export function add(data) {
  return request({
    url: `/?m=role&a=add`,
    method: 'POST',
    data,
  })
}

export function edit(data) {
  return request({
    url: `/?m=role&a=edit`,
    method: 'POST',
    data,
  })
}

